import * as  interviewApi from '@/api/interview'
const state ={
  // 面试技巧/文章列表
  interviewList: {},
  // 文章详情
  ArticlesDetail: {},

}


const mutations= {
   // 面试技巧/文章列表
  GET_INTERVIEW_LIST(state, newValue){
    state.interviewList = newValue;
  },
   // 文章详情
  GET_ARTICLES_DETAIL_LIST(state, newValue){
    state.ArticlesDetail = newValue;
  },



}

const actions = {
   // 面试技巧/文章列表
  async updateinterviewList({commit},params){
    const res =await interviewApi.getinterviewList(params);
    commit('GET_INTERVIEW_LIST',res);
  },
   // 文章详情
  async updateArticlesDetail({commit},params){
    const res =await interviewApi.getArticlesDetail(params);
    commit('GET_ARTICLES_DETAIL_LIST',res);
  },

}


export default {
  namespaced: true,
  state,
  mutations,
  actions
}
